using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_DataTypeInfoMap : EntityTypeConfiguration<t_DataTypeInfo>
    {
        public t_DataTypeInfoMap()
        {
            // Primary Key
            this.HasKey(t => t.FDataType);

            // Properties
            this.Property(t => t.FDataType)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FTypeName)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("t_DataTypeInfo");
            this.Property(t => t.FDataType).HasColumnName("FDataType");
            this.Property(t => t.FTypeName).HasColumnName("FTypeName");
            this.Property(t => t.FMaxPrecision).HasColumnName("FMaxPrecision");
            this.Property(t => t.FMinScale).HasColumnName("FMinScale");
            this.Property(t => t.FMaxScale).HasColumnName("FMaxScale");
            this.Property(t => t.FActualType).HasColumnName("FActualType");
            this.Property(t => t.FActualSize).HasColumnName("FActualSize");
            this.Property(t => t.FBindType).HasColumnName("FBindType");
        }
    }
}
